updating oE free_console

free_console

include console.e 
namespace console 
public procedure free_console() 

frees (deletes) any console window associated with your program.

Comments:

Euphoria will create a console text window for your program the first time that your program prints something to the screen, reads something from the keyboard, or in some way needs a console. On Windows this window will automatically disappear when your program terminates, but you can call free_console to make it disappear sooner. On Unix the text mode console is always there, but an xterm window will disappear after Euphoria issues a "Press Enter" prompt at the end of execution.

On Unix free_console will set the terminal parameters back to normal, undoing the effect that curses has on the screen.

In a Unix terminal a call to free_console (without any further printing to the screen or reading from the keyboard) will eliminate the "Press Enter" prompt that Euphoria normally issues at the end of execution.

After freeing the console window, you can create a new console window by printing something to the screen, calling clear_screen, position, or any other routine that needs a console.

When you use the trace facility, or when your program has an error, Euphoria will automatically create a console window to display trace information, error messages, and so on.

There is a WINDOWS API routine, FreeConsole() that does something similar to free_console. Use the Euphoria free_console because it lets the interpreter know that there is no longer a console to write to or read from.

See Also:

clear_screen

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu